package com.cast.health.exception;

import com.cast.health.entity.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

//@ControllerAdvice
@Slf4j
public class SysException {

    @ExceptionHandler
    @ResponseBody
    public Result ex(RuntimeException e){

        return new Result(false,"用户已存在");
    }
}

